#!/usr/bin/env python3
"""
简单的测试脚本
"""

import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)))

def simple_test():
    """简单测试"""
    print("开始测试...")
    
    try:
        # 测试导入
        from src.services.service_registry import service_registry
        from src.services.service_wrappers import register_all_services
        from src.services.service_orchestrator import ServiceOrchestrator
        
        print("导入成功")
        
        # 注册服务
        register_all_services()
        print("服务注册完成")
        
        # 测试服务协调器
        orchestrator = ServiceOrchestrator()
        print("服务协调器创建完成")
        
        # 测试查询
        query = "查询用户admin的信息"
        result = orchestrator._fallback_service_selection(query)
        print(f"查询结果: {result}")
        
        print("测试完成")
        
    except Exception as e:
        print(f"错误: {e}")
        import traceback
        traceback.print_exc()

if __name__ == "__main__":
    simple_test()